/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package ia_psr.builder;

import ia_psr.graph.Nodo;

/**
 *
 * @author Rubén Avalos Elvira y Fabiana Celiberti Tapie
 */
public class DirectedGraphBuilder extends GraphBuilder {
    
    public static GraphBuilder getInstance() {
        if (instance == null)
            instance = new DirectedGraphBuilder();
        return instance;
    }

    public void buildNode(String name) {
        g.addNodo(new Nodo(name));
    }

    public void buildEdge(Nodo n1, Nodo n2) {
        g.addArista(n1, n2);
    }

    public void buildEdge(String n1, String n2) {
        g.addArista(n1, n2);
    }
    
}
